<?php 
if(!empty($getAgentVote))
{
	?>
	<table width="100%" border="1">
	<tr>
	<td colspan="4" align="center">
	<font size="5">Agent Quality Rating Report</font>
	</td>
	</tr>
	<?php
	foreach($getAgentVote as $vote)
	{
		if($vote['id']!='5')
		{
			$name=$vote['agent_name'];
			$goodFb=$vote['good_feetback'];
			$rate=$goodFb/$totalVote*1000;
			$rateNum=$goodFb/$totalVote*100;
			$rateNum=round($rateNum);
			$badFb=$vote['bad_feetback'];
			?>
			<tr height="2">
			<td><?php echo "<b>$name</b>";?></td>
			<td><div style="background-color:#8FBC8F;width:<?php echo $rate;?>px;"><font color="#8FBC8F" >0</font></div></td>
			<td>
			<font color="red" ><?php echo $rateNum."%";?></font>
			</td>
			<td>
			<?php echo $goodFb;?> people <img src="../images/like.jpg" />
			</td>
			</tr>
			<?php
			
		}
		
	}
	if(session::is_manager()==TRUE)
	{
		?>
		<tr>
		<td colspan=4 align="center" >
		<font size="5">Agent Bad Rating Report</font>
		</td>
		</tr>
		<?php
		foreach($getAgentVote as $vote)
		{
			if($vote['id']!='5')
			{
				$name=$vote['agent_name'];
				$badFb=$vote['bad_feetback'];
				$badrate=$badFb/$totalBadVote*1000;
				$badrateNum=$badFb/$totalBadVote*100;
				$rateNum=round($rateNum);
				$badFb=$vote['bad_feetback'];
				?>
				
				<tr height="2">
					<td><?php echo "<b>$name</b>";?></td>
				<td><div style="background-color:#8FBC8F;width:<?php echo $badrate;?>px;"><font color="#8FBC8F" >0</font></div></td>
				<td	>
				<font color="red" ><?php echo $badrateNum."%";?></font>
				</td>
				<td>
				<?php echo $badFb;?> people <img src="../images/like.jpg" />
				</td>
				</tr>
				<?php
			
		}
		
	}
			}
	?>
	</table>
	<?php
	
}
else
{
	echo "empty";
}

?>